/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ssp.strategy.agent;

import ssp.utility.PropertyManager;

/**
 * パラメータ設定に基づいてAgentStrategyを返すクラス
 * @author yamazaki
 */
public class AgentStrategySelector {
    
    public static Agent_v1_Strategy getAgent_v1_Strategy() {
        
        String strategy = PropertyManager.getValueAsString("Strategy");
        
        //switch文でstringを使えるのはJDK7以降
        switch(strategy) {
            case "agent_v1_strategy_v1":
                return new Agent_v1_Strategy_v1();
            case "agent_v1_strategy_v2":
                return new Agent_v1_Strategy_v2();
            case "agent_v1_strategy_v3":
                return new Agent_v1_Strategy_v3();
                case "agent_v1_strategy_v4":
                return new Agent_v1_Strategy_v4();
            default:
                throw new RuntimeException();
        }
        
//        if(strategy.equals("agent_v1_strategy_v1"))
//            return new Agent_v1_Strategy_v1();
//        else if(strategy.equals("agent_v1_strategy_v2"))
//            return new Agent_v1_Strategy_v2();
//        else if(strategy.equals("agent_v1_strategy_v3"))
//            return new Agent_v1_Strategy_v3();
//        else
//            throw new RuntimeException();
    }
    
}
